<?

if( !$_GET['file']) return null;


$type = preg_replace( "/[^\w\s]/", "", array_pop( explode( ".", $_GET['file'])));  
$file = preg_replace( "/[^\w\s\.\-\_]/", "", $_GET['file']);


#	WORK IT, BABY!
	$mime = in_array( $type, array( "jpeg", "png" ))? "image" : "text";	
	
	header( "Content-type: $mime/$type" );


if( file_exists( $file = dirname ( __FILE__ ) . "/static/$type/$file" ))
	
	readfile( $file );



?>